<template>
  <div>
    <el-container>
      <el-main>
        <div class="contentShadow">
          <h1>学生软件著作权成果</h1>
          <el-radio-group v-model="size">
            <el-radio label="">默认</el-radio>
            <el-radio label="medium">中等</el-radio>
            <el-radio label="small">小型</el-radio>
            <el-radio label="mini">超小</el-radio>
          </el-radio-group>
          <el-descriptions class="des" direction="vertical" :column="4" :size="size" border>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-s-promotion"></i>
                全称
              </template>
              {{ softwareCopyright.fullName }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-s-promotion"></i>
                简称
              </template>
              {{ softwareCopyright.shortForm }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-user-solid"></i>
                姓名
              </template>
              <el-tag type="success" :size="size">{{ softwareCopyright.name }}</el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-user"></i>
                学号
              </template>
              <el-tag type="main" :size="size">{{ softwareCopyright.studentId }}</el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-paperclip"></i>
                版本号
              </template>
              {{ softwareCopyright.version }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-date"></i>
                开发完成日期
              </template>
              <el-tag type="danger" :size="size">{{ softwareCopyright.date }}</el-tag>
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-aim"></i>
                著作权证书编号
              </template>
              {{ softwareCopyright.code }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-discover"></i>
                著作权状态
              </template>
              {{ softwareCopyright.status }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-paperclip"></i>
                开发方式
              </template>
              <el-tag type="warning" :size="size">
                <template v-if="softwareCopyright.method === 1">单独开发</template>
                <template v-else-if="softwareCopyright.method === 2">合作开发</template>
                <template v-else-if="softwareCopyright.method === 3">委托开发</template>
                <template v-else-if="softwareCopyright.method === 4">下达任务开发</template>
                <template v-else-if="softwareCopyright.method === 5">其它</template>
              </el-tag>
            </el-descriptions-item>

            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-s-custom"></i>
                著作权人
              </template>
              {{ softwareCopyright.owner }}
            </el-descriptions-item>
            <el-descriptions-item :span="2">
              <template slot="label">
                <i class="el-icon-document"></i>
                描述
              </template>
              {{ softwareCopyright.description }}
            </el-descriptions-item>

          </el-descriptions>
        </div>
      </el-main>
    </el-container>
  </div>
</template>


<style scoped>
.des {
  font-size: larger;
}
</style>
<script>
import {findSoftwareCopyrightDetail} from "@/api/admin";

export default {
  data() {
    return {
      size: "",
      softwareCopyright: {
        softwareCopyrightId: 0,
        fullName: '',
        shortForm: '',
        version: '',
        owner: '',
        code: '',
        status: '',
        description: '',
        date: '',
        method: '',
        studentId: "2200012345",
        name: "张三",
      },
    }
  },
  mounted() {
    this.softwareCopyright.softwareCopyrightId = Number(window.location.search.substring(4));
    findSoftwareCopyrightDetail(this.softwareCopyright.softwareCopyrightId).then(res => {
      this.softwareCopyright = res.data
    })
  },
  methods: {}
}
</script>
